package com.isoft.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.isoft.entity.SysLogContent;
import org.apache.ibatis.annotations.*;

@Mapper
public interface SysLogDao extends BaseMapper<com.isoft.entity.SysLogContent> {

    @Select("select * from AIRPORT.SYSLOG")
    IPage<SysLogContent> getAll(Page<?> page);

    @Insert("INSERT AIRPORT.SYSLOG VALUES(#{desc},#{systype},#{oprtype},#{requesturl},#{method},#{ipaddress},#{logtype},#{dodt})")
    public int addLog(SysLogContent sysLogContent);

    @Delete("DELETE FROM AIRPORT.SYSLOG WHERE ID=#{id}")
    public int delLog(Integer id);

    IPage<SysLogContent> getByCons(Page<?> page, @Param("systype")String systype,@Param("oprtype") String oprtype);
}
